home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Caml Light 0.61 / Binaries / examples / asl / parser.mli < prev    next >
Encoding:
Text File  |  1993-09-24  |  626 b   |  26 lines  |  [TEXT/ttxt]

  1. (* $Id: parser.mli,v 1.7 91/10/04 14:22:12 ddr Exp $ *)
  2.  
  3. #open "stream";;
  4. #open "asl";;
  5. #open "token";;
  6.  
  7. type asl = Const of int
  8.          | Var of int
  9.          | Cond of asl * asl * asl
  10.          | App of asl * asl
  11.          | Abs of string * asl
  12. and top_asl = Decl of string * asl;;
  13.  
  14. exception Unbound of string;;
  15.  
  16. value init_env : string list;;
  17. value global_env : string list ref;;
  18.  
  19. value top : token_type stream -> top_asl;;
  20. value expr : token_type stream -> string list -> asl;;
  21. value expr0 : token_type stream -> string list -> asl;;
  22.  
  23. value print_top : top_asl -> string stream;;
  24. value print_expr : asl -> string stream;;
  25.  
  26.